package com.itheima02;

import java.util.ArrayList;
import java.util.Scanner;

public class StudentManger {
    public static void main(String[] args) {
        //创建集合对象，存储学生信息
        ArrayList<Student> array = new ArrayList<>();
        while (true) {
            System.out.println("-------------welcome----------");
            System.out.println("1 添加");
            System.out.println("2 删除");
            System.out.println("3 修改");
            System.out.println("4 查询");
            System.out.println("5 退出");
            System.out.println("请选择:");
            Scanner sc = new Scanner(System.in);
            String line = sc.nextLine();
            switch (line) {
                case "1":
                    //System.out.println("add");
                    //addStudent(array);
                    break;
                case "2":
                    //deleteStudent(array);
                    break;
                case "3":
                    //updateStudent(array);
                    break;
                case "4":
                    //findAllStudent(array);
                    break;
                case "5":
                    System.out.println("thanks");
                    System.exit(0); //java虚拟机的退出
            }
        }
    }

    //添加学生
    public static void addStudent(ArrayList<Student> arr){
        Scanner sc = new Scanner(System.in);
        System.out.println("学号");
        String sid = sc.nextLine();
        System.out.println("姓名");
        String name = sc.nextLine();
        System.out.println("年龄");
        int age = sc.nextInt();
        System.out.println("地址");
        String address = sc.nextLine();


        Student s2 = new Student(sid,name,age,address);
    }

}
